Assembly: C1.LiveLinq (in C1.LiveLinq.dll)
Syntax
C# |
---|
public class IndexedCollection<T> : Collection<T>, IObservableSource<T>, IItemIdProvider<T>, IIndexedSource<T>, IValidatable, IBindingListView, IC1BindingList<T>, IDataBindableList<T>, IList<T>, ICollection<T>, IEnumerable<T>, IBindingList, IList, ICollection, IEnumerable |
Visual Basic |
---|
Public Class IndexedCollection(Of T) _ Inherits Collection(Of T) _ Implements IObservableSource(Of T), IItemIdProvider(Of T), _ IIndexedSource(Of T), IValidatable, IBindingListView, IC1BindingList(Of T), _ IDataBindableList(Of T), IList(Of T), ICollection(Of T), _ IEnumerable(Of T), IBindingList, IList, ICollection, IEnumerable |
Type Parameters
- T
- The type of the elements in the collection.
Remarks
If you don't have preexisting collection classes and need to create your own, the best choice is to use the built-in LiveLinq collection class IndexedCollection<T>. It is specifically optimized for LiveLinq use.
Usually, the element class T must implement the property change notification interface INotifyPropertyChanged. The easiest way to implement INotifyPropertyChanged is to derive the element class from IndexableObject.
In rare cases where implementing INotifyPropertyChanged is impossible, a custom PropertyChangeListener<(Of <(<'T>)>)> can be provided instead.
For details, see Using the built-in collection class IndexedCollection(T) (LiveLinq to Objects).
For alternative options in LiveLinq to Objects, see LiveLinq to Objects: IndexedCollection(T) and other collection classes
The IndexedCollection<T> class is not needed in LiveLinq to DataSet and LiveLinq to XML, because in those cases LiveLinq works with collections that already exist in ADO.NET and XML.
Inheritance Hierarchy
System.Collections.ObjectModel..::..Collection<(Of <(<'T>)>)>
C1.LiveLinq.Collections..::..IndexedCollection<(Of <(<'T>)>)>